This document describes how to set up xPC Target so that the Simulink model can be clocked off of an interrupt generated by Scramnet.  There are three things you must do:

1) Determine if there is an IRQ assignment conflict on the PC between Scramnet and another card.
2) If there is a conflict, reassign IRQs so that the Scramnet card has a unique IRQ.
3) Set up Real-Time Workshop's code generation options.


Step 1:  Determine if there is a PCI IRQ assignment conflict.

a) In Matlab, type "getxpcpci all" in the command window to get a listing of all interrupt assignments (among other things).  The xPC Target kernel must be running on the target at this time in order for this to work.  The Scramnet board will show up in the line with VendorID 11B0 and DeviceID 4750.  If the IRQ assigned to the Scramnet board is the same as another card (especially an Ethernet card), you must reassign one or the other so that Scramnet has a unique IRQ.  When Scramnet conflicts with an Ethernet card, the TCP/IP communication between the xPC Target and the host will hang.

b) Another way to view the PC's PCI IRQ assignments is to reboot the PC and drop into the BIOS setup.  This is described in Step 2.


Step 2:  If there is a conflict, reassign IRQs.  (NOTE:  This section is BIOS-dependent.)

a) Reboot the PC.  At just the right moment, hit the Setup function key (F2).  If you hit it too soon, there will be a keyboard error.

b) In the setup main menu, select "PCI IRQ Assignment".  The Scramnet card entry will be listed as "(unknown manf) network card", and its IRQ will probably be the same as the Ethernet card.  You must change either the Scramnet card IRQ or the Ethernet card IRQ so that they do not share the same interrupt.  IRQ 11 is a good choice, if available.

c) Hit Enter to return to the setup main menu, then <ESC>, then "Save Changes and Exit".

d) The PC will reboot itself and you can insert the xPC Target disk into the floppy disk drive.


Step 3:  Set up Real-Time Workshop's code generation options

a) In Simulink, go into the Simulation menu, Real-Time Workshop, xPC Target code generation options.

b) Enter the following information into the window:

	Real-Time interrupt source:		<whatever IRQ you set up Step 2>
	I/O board generating the interrupt:	Scramnet_SC150+
	PCI slot/ISA base address:		-1
